package demo12.gumballmonitor;

/**
 * 糖果监视器
 * */
public class GumballMonitor {
	GumballMachine machine;
	 
	public GumballMonitor(GumballMachine machine) {
		this.machine = machine;
	}
 //打印糖果机器的位置，糖果总数和状态。
	public void report() {
		System.out.println("糖果机位置: " + machine.getLocation());
		System.out.println("目前的库存: " + machine.getCount() + " 糖果");
		System.out.println("当前状态: " + machine.getState());
	}
}
